<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "energy_logs".
 *
 * @property int $id
 * @property int $type 1=广告增加，2=注册增加，3=商品扣减
 * @property int $num
 * @property string|null $ctime
 * @property int $user_id
 */
class EnergyLogs extends \yii\db\ActiveRecord {
    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return 'energy_logs';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['type', 'num'], 'integer'],
            [['ctime'], 'safe'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'type' => 'Type',
            'num' => 'Num',
            'ctime' => 'Ctime',
        ];
    }
}
